import request from '@/utils/request'
//分页查询
export function searchSpec(data) {
  return request({
    url: '/spec/page',
    method: 'post',
    data
  })
}

//保存
export function saveSpec(data) {
    return request({
      url: '/spec/save',
      method: 'post',
      data
    })
}


//修改规格选项
export function updateOptions(data) {
  return request({
    url: '/spec/update',
    method: 'post',
    data
  })
}

//查询所有的规格
export function findSpecAll() {
  return request({
    url: '/spec/findAll',
    method: 'get',
  })
}

//删除
export function delOne(id) {
  return request({
    url: `/spec/${id}`,
    method: 'get'
  })
}


export function getOne(id) {
  return request({
    url: `/spec/findOne/${id}`,
    method: 'get'
  })
}